package cool.webstudy.singletondynamicscheduler.service.impl;

import org.springframework.stereotype.Component;

import java.util.Date;

@Component("TaskDemo") // bean name，如果只添加@Component，则bean name为taskDemo，默认为类名首字母小写
public class TaskDemo {
    public void doTask() {
        System.out.println(new Date() + " 无参 do task");
    }

    public void doTask(String param) {
        System.out.println(new Date() + "do task,param:" + param);
    }

    public void doTask2() {
        System.out.println(new Date() + "do task2");
    }
}
